package edu.mobbuzz.daf.dao.ibatis;

import java.util.HashMap;
import java.util.Map;

import edu.mobbuzz.daf.bean.User;
import edu.mobbuzz.daf.dao.IUserDao;

public class UserDaoImpl extends BaseDaoImpl implements IUserDao {

	@Override
	protected String getNamespace() {
		return "User";
	}
	
	public User findUserId(String username, String password) {
		try {
			Map map = new HashMap();
			map.put("username",username);
			map.put("password",password);
			return (User) getSqlMapClientTemplate().queryForObject(getNamespace()+".findUserId", map);
		}catch (Exception e) {
			e.printStackTrace();
			
		}	
		return null;
	}
}
